import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'
import VideoView from '@/views/VideoView.vue'
import LoginView from '@/views/LoginView.vue';
import CenterView from "@/views/CenterView.vue";
import UpView from "@/views/UpView.vue";

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            component: HomeView,
        },
        {
            path: '/video/:bvid',
            name: 'video',
            component: VideoView,
        },
        {
            path: '/login',
            name: 'login',
            component: LoginView,
        },
        {
            path: '/center',
            name: 'center',
            component: CenterView,
        },
        {
          path:'/up/:id',
          name:'up',
          component: UpView,
        },
    ],
})

export default router
